<template>
  <div class="parent-content">
    <h2>Parent</h2>
    <div>值:{{ obj }}</div>
    <el-button @click="abc++">+</el-button>
    <Son
      v-model="obj"
      :abc="abc" />
    <el-select v-model="value"></el-select>
    <el-input v-model="value"></el-input>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import Son from './son.vue'
import Decimal from 'decimal.js'
import { parse, stringify } from 'lossless-json'

const obj = ref()
const value = ref()
const abc = ref(0)

Decimal.set({ precision: 100 })

const cc = new Decimal(1)

// console.log(Decimal.precision, new Decimal('0.1').plus(0.2).toNumber())

const jsonString = '{"name":"张三","age":38.1234567890987654321,"sex":"2","menu":3341.34}'

console.log(cc.div(3).plus(2).toPrecision(20))
</script>

<style scoped>
.parent-content {
  background-color: lightgoldenrodyellow;
}
</style>
